import Vue from 'vue'
import App from './App'
import api from '@/common/api.js'

Vue.config.productionTip = false
Vue.prototype.$api = api

import operate from "common/operate.js" //全局js
Vue.prototype.$operate = operate

//路由封装
import routr from './utils/routeBlocker.js'
Vue.prototype.$routr = routr

//小程序 - 全局分享设置
import share from './utils/wxShare.js'
Vue.mixin(share)

//引入store
import store from 'store/index.js'
Vue.prototype.$store = store

//监听主题变化
import theme from './theme/cue-theme.js'
Vue.use(theme)

// 国际化 json 文件，文件内容详见下面的示例
import messages from './locale/index.js'
let il8nConfig = {
	locale: uni.getLocale(), //获取已设置语言
	messages, // 设置语言环境信息
	silentTranslationWarn: true,
}
import VueI18n from 'vue-i18n'
Vue.use(VueI18n)
const i18n = new VueI18n(il8nConfig)

App.mpType = 'app'

const app = new Vue({
	...App,
	i18n
})
app.$mount()
